package com.example.module_main.ui.splash

import com.example.lib_common.base.BaseViewModel
import com.example.module_main.model.AdModelItem
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class SplashViewModel @Inject constructor(private val repository: SplashRepository) : BaseViewModel() {
    var mAppStartAfInfo:AdModelItem? = null
    /**
     * 广告数据
     */
    fun addList(){
        execute(
            action = repository.adList(),
            onFinish = {
                mAppStartAfInfo = it.data.firstOrNull()
            }
        )
    }
}